package com.zhongke.cotrun.controller.manager;

import com.zhongke.cotrun.common.util.APIResponse;
import com.zhongke.cotrun.model.exception.MyException;
import com.zhongke.cotrun.model.pojo.ExpertInfo;
import com.zhongke.cotrun.model.resultpackage.CodeMsg;
import com.zhongke.cotrun.service.ExpertInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/manager/ExpertInfo")
public class ExpertInfoManagerController {
    @Autowired
    ExpertInfoService expertInfoService;


    /**
     * 专家认证模块
     *
     * @param expertInfo
     * @return
     */
    @RequestMapping("/expertsCertification")
    public APIResponse expertsCertification(ExpertInfo expertInfo) throws MyException {
        if (expertInfoService.updateAuditStatus(expertInfo)) {

            return APIResponse.returnSuccess();
            //return ReturnResult.success();
        }
        return APIResponse.returnFail(CodeMsg.AUC_ERROR);
        //return  ReturnResult.erro(CodeMsg.AUC_ERROR);
    }


}
